package com.hotleproject.service.impl;

import com.hotleproject.mapper.HotleMapper;
import com.hotleproject.mapper.RoomMapper;
import com.hotleproject.mapper.SingleMapper;
import com.hotleproject.pojo.Comment;
import com.hotleproject.pojo.Hotle;
import com.hotleproject.pojo.Room;
import com.hotleproject.service.SingleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class SingleServiceImpl implements SingleService {

    @Autowired
    private SingleMapper singleMapper;
    @Override
    public Hotle findAllHotle(String hotlename) {
        return this.singleMapper.selectAllHotle(hotlename);
    }

    @Override
    public String findRoomFaci() {
        return this.singleMapper.selectRoomFaci();
    }

    @Override
    public List<Room> findAllRoom() {
        return this.singleMapper.selectAllRoom();
    }

    @Override
    public List<Comment> findComment(String hotlename) {
        return this.singleMapper.selectAllComment(hotlename);
    }

    @Override
    public Comment findNullComment() {
        return this.singleMapper.selectNullComment();
    }
}
